import Grid from "@material-ui/core/Grid";
import * as React from "react";

export const ActionBar = ({children, sourceClick, link}: any) => {
    return <Grid container={true} item={true} xs={12} className={"flex-center"}>
        <Grid item={true} xs={link ? 10 : 12}>
            {children}
        </Grid>
        {
            link ? <Grid item={true} onClick={sourceClick} xs={2}>{link}</Grid> : null
        }
    </Grid>
};
export default ActionBar;

